package com.zh.work.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * code is far away from bug with the animal protecting
 * ┏┓　　　┏┓
 * ┏┛┻━━━┛┻┓
 * ┃　　　　　　　┃
 * ┃　　　━　　　┃
 * ┃　┳┛　┗┳　┃
 * ┃　　　　　　　┃
 * ┃　　　┻　　　┃
 * ┃　　　　　　　┃
 * ┗━┓　　　┏━┛
 * 　　┃　　　┃神兽保佑
 * 　　┃　　　┃代码无BUG！
 * 　　┃　　　┗━━━┓
 * 　　┃　　　　　　　┣┓
 * 　　┃　　　　　　　┏┛
 * 　　┗┓┓┏━┳┓┏┛
 * 　　　┃┫┫　┃┫┫
 * 　　　┗┻┛　┗┻┛
 *
 * @Description:
 * @Author: Li.HuiNeng
 * @Create in: 2019-11-22 10:04
 * @Version: 1.0.1
 */
@Data
@EqualsAndHashCode(callSuper = true)
abstract class RecordClass extends Model<RecordClass> implements Serializable {
    private static final long serialVersionUID = 1766804300587272017L;

    @ApiModelProperty(value = "before_value", name = "修改之前值")
    private String beforeValue;
    @ApiModelProperty(value = "after_value", name = "修改之后值")
    private String afterValue;
    @ApiModelProperty(value = "create_time", name = "创建时间")
    private String createTime;
    @ApiModelProperty(value = "operator_id", name = "操作人id")
    private Long operatorId;
    @ApiModelProperty(value = "ip", name = "操作人登录ip")
    private String ip;
    @ApiModelProperty(value = "success", name = "是否成功")
    private Boolean success;
    @ApiModelProperty(value = "request_param", name = "请求参数")
    private String requestParam;
    @ApiModelProperty(value = "request_func", name = "请求方法名")
    private String requestFunc;
    @ApiModelProperty(value = "remark", name = "备注")
    private String remark;

    RecordClass() { }

    RecordClass(String beforeValue, String afterValue, Long operatorId, String requestFunc) {
        this.beforeValue = beforeValue;
        this.afterValue = afterValue;
        this.operatorId = operatorId;
        this.requestFunc = requestFunc;
    }

    RecordClass(String beforeValue, String afterValue, String createTime, Long operatorId, String ip, Boolean success, String requestParam, String requestFunc) {
        this.beforeValue = beforeValue;
        this.afterValue = afterValue;
        this.createTime = createTime;
        this.operatorId = operatorId;
        this.ip = ip;
        this.success = success;
        this.requestParam = requestParam;
        this.requestFunc = requestFunc;
    }
}
